using Microsoft.EntityFrameworkCore;
using MvcSoftDemo.Models;

namespace MvcSoftDemo.Db
{
    public class DemoDb:DbContext{
        public DbSet<Product> Product { get; set; }
        public DbSet<Category> Category { get; set; }
        private readonly string SqlString ="server=.;database=MvcSoftDemo;uid=sa;pwd=123456;";
        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder){
            optionsBuilder.UseSqlServer(SqlString);
        }
    }
}